﻿<Application x:Class="Microsoft.Research.DynamicDataDisplay.Samples.App"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:local="clr-namespace:Microsoft.Research.DynamicDataDisplay.Samples.Internals"
			 xmlns:m="clr-namespace:Microsoft.Research.DynamicDataDisplay.Samples.Internals.Models"
			 xmlns:p="clr-namespace:Microsoft.Research.DynamicDataDisplay.Samples.Internals"
			 StartupUri="MainWindow.xaml">
	<Application.Resources>

		<m:SamplesCollection x:Key="samples">
			<m:ReleaseInfo Version="0.2.0">
				<m:Demonstration Description="{p:Resource AnimationSample}" Uri="/Demos/v02/AnimationSample.xaml"/>
				<m:Demonstration Description="{p:Resource CurrencyExchangeSample}" Uri="/Demos/v02/CurrencyExchange/CurrencyExchangeSample.xaml"/>
				<m:Demonstration Description="{p:Resource StockExchangeSample}" Uri="/Demos/v02/StockExchange/StockExchangeSample.xaml"/>
				<m:Demonstration Description="{p:Resource ImageHistogram}" Uri="/Demos/v02/ImageHistogram.xaml"/>
				<m:Demonstration Description="{p:Resource TooltipSample}" Uri="/Demos/v02/TooltipSample.xaml"/>
			</m:ReleaseInfo>
			<m:ReleaseInfo Version="0.3.0">
				<m:Demonstration Description="{p:Resource Coastline}" Uri="/Demos/v03/Coastline.xaml"/>
				<m:Demonstration Description="{p:Resource Maps}" Uri="/Demos/v03/Maps.xaml"/>
				<m:Demonstration Description="{p:Resource MercatorShaderMaps}" Uri="/Demos/v03/MercatorShaderMaps.xaml"/>
				<m:Demonstration Description="{p:Resource Isoline}" Uri="/Demos/v03/Isolines/Isolines.xaml"/>
				<m:Demonstration Description="{p:Resource SimulationSample}" Uri="/Demos/v03/SimulationSample.xaml"/>
			</m:ReleaseInfo>
			<m:ReleaseInfo Version="0.3.1">
				<m:Demonstration Description="{p:Resource HideAxisSample}" Uri="/Demos/v031/HideAxisSample.xaml"/>
				<m:Demonstration Description="{p:Resource AxisColoringSample}" Uri="/Demos/v031/AxisColoringSample.xaml"/>
			</m:ReleaseInfo>
			<m:ReleaseInfo Version="0.4.0">
				<m:Demonstration Description="Editable shapes" Uri="/Demos/v04/EditableShapesSample.xaml"/>
				<m:Demonstration Description="Markers" Uri="/Demos/v04/Markers/NewMarkersSample.xaml"/>
			</m:ReleaseInfo>
			<m:ReleaseInfo Version="1.0.0">
				<m:Demonstration Description="Plotter panels" Uri="/Demos/v10/PlotterPanels.xaml"/>
			</m:ReleaseInfo>
		</m:SamplesCollection>

		<local:VersionToBrushConverter x:Key="versionConverter"/>
		
		<Style TargetType="{x:Type TextBlock}" x:Key="TextStyle">
			<Setter Property="Foreground" Value="White"/>
			<Setter Property="Margin" Value="2,0,2,0"/>
			<Setter Property="FontSize" Value="10"/>
		</Style>

		<Style TargetType="{x:Type Rectangle}" x:Key="RectangleStyle">
			<Setter Property="RadiusX" Value="3"/>
			<Setter Property="RadiusY" Value="3"/>
			<Setter Property="Fill" Value="{Binding Version, Converter={StaticResource versionConverter}}"/>
		</Style>

		<Style TargetType="{x:Type Grid}" x:Key="GridStyle">
			<Setter Property="HorizontalAlignment" Value="Center"/>
			<Setter Property="VerticalAlignment" Value="Center"/>
			<Setter Property="ClipToBounds" Value="True"/>
		</Style>

		<HierarchicalDataTemplate DataType="{x:Type m:ReleaseInfo}" ItemsSource="{Binding Demonstrations}">
			<StackPanel Orientation="Horizontal">
				<TextBlock>Release</TextBlock>
				<Grid Style="{StaticResource GridStyle}">
					<Rectangle Style="{StaticResource RectangleStyle}"/>
					<TextBlock Text="{Binding Version}" Style="{StaticResource TextStyle}"/>
				</Grid>
			</StackPanel>
		</HierarchicalDataTemplate>

		<HierarchicalDataTemplate DataType="{x:Type m:Demonstration}">
			<TextBlock Text="{Binding Description}"/>
		</HierarchicalDataTemplate>
	</Application.Resources>
</Application>
